/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Utility;

import java.io.FileInputStream;
import java.util.Properties;


/**
 *
 * @author Shuhail
 */
public class PropReader {
    Properties prop=new Properties();
    
    public static PropReader getInstance() {
        
        return new PropReader();
    }
    
    public String getVal(String name,String file) {
        
        try {
            
   //         prop.load(new FileInputStream("C:\\Users\\Shuhail\\Documents\\NetBeansProjects\\RoyalBatteries\\src\\prop\\DB_Details.properties"));
           prop.load(new FileInputStream(file));
            //return prop.getProperty("dbUrl");
            
        }catch(Exception e) {
            
            e.printStackTrace();
        }
        return prop.getProperty(name);
    }
    
   
}
